import Vue from 'vue'
import Router from 'vue-router'
import navView from '@/views/Layout/navView'
import indexLayout from '@/views/Layout/indexLayout.vue'
import indexMap from '@/views/mapView/indexMap.vue'
import DataView from '@/views/MeiliXian/DataView.vue'
import layerSwitch from '@/views/mapView/layerSwitch.vue'
import measureControl from '@/views/mapView/measureControl.vue'
import menuView from '@/views/MeiliXian/menuView.vue'
import tableView from '@/components/tableView.vue'
const CollegeStation = () => import('@/views/CollegeStation/index.vue')
const FoodCount = () => import('@/views/FoodCourt/index.vue')
const xianTourism = () => import('@/views/XianTourism/index.vue')
Vue.use(Router)
const router = new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'index',
      component: indexLayout,
      children: [
        {
          path: 'nav',
          name: 'navView',
          component: navView,
          children: [
            {
              path: '/DataView',
              name: 'DataView',
              component: DataView,
              children: [
                {
                  path: '/menuView',
                  name: 'menuView',
                  component: menuView
                }
              ]
            },
            {
              path: '/index',
              name: 'CollegeStation',
              component: CollegeStation
            },
            {
              path: '/index',
              name: 'FoodCount',
              component: FoodCount
            },
            {
              path: '/index',
              name: 'xianTourism',
              component: xianTourism
            }
          ]
        },
        {
          path: '/indexMap',
          name: 'indexMap',
          component: indexMap,
          children: [
            {
              path: '/layerSwitch',
              name: 'layerSwitch',
              component: layerSwitch
            },
            {
              path: '/measureControl',
              name: 'measureControl',
              component: measureControl

            },
            {
              path: '/tableView',
              name: 'tableView',
              component: tableView
            }
          ]
        },
        {
          path: '/cesiumVue',
          name: 'cesiumVue',
          component: () => import('@/views/threeDMap/cesiumView.vue')
        }
      ]
    }
  ]
})

export default router
